<!DOCTYPE html>
<html>

<head>
<!-- ҳ��meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>数组下标测试</title>

<script type="text/javascript">
	var response = [];
	response["a"]
	
	 function arrayTest1() {
		for (var i = 0; i < 10; i++) {
			response[i+"str"]=1+i

		}
	}
	arrayTest1();
	console.log(response);
	console.log(response["0str"]); //js数组 字符串也可以做下标
	console.log(response["8str"]);
	/*console.log(response);
	
	var itemList = [];
	
	function arrayTest() {
		for (var i = 0; i < response.length; i++) {
			if(i%2==0){
				var obj = response[i]; //{id: 1, name: "str1", type: "x1"}
				itemList[obj.id] = obj.name
			}
		}
	}

	arrayTest();
	console.log(itemList);
	console.log(itemList.length);
	console.log(itemList[1]);
	console.log(itemList[98]);  */
</script>
</head>

<body>


</body>

</html>